package com.rocksdata.mc.ui.adapter;


import android.content.Context;
import android.widget.ImageView;

import com.ctz.commonframe.ui.widget.AbsAdapter;
import com.ctz.commonframe.ui.widget.AdapterViewHolder;
import com.ctz.commonframe.utils.GlideApp;
import com.rocksdata.mc.BuildConfig;
import com.rocksdata.mc.Config;
import com.rocksdata.mc.R;

import java.util.List;


public class ImageUrlGridAdapter extends AbsAdapter<String> {

	public ImageUrlGridAdapter(Context context, List<String> imageItemList) {
		super(context, imageItemList, R.layout.item_image_grid);
	}

	@Override
	public int getCount() {
		return datas.size();
	}

	@Override
	public void convert(AdapterViewHolder holder, String data) {
		ImageView imageView = holder.getView(R.id.image);
		GlideApp.with(context).load(BuildConfig.HOST + data.substring(1, data.length())).into(imageView);
//		XUtils3ImageDisplayer.display(imageView, Config.HOST + data.substring(1, data.length()));
	}
}
